using ClownFish;
using System;
using System.Reflection;

internal sealed class Class34
{
	public Class6 class6_0;

	private DbColumnAttribute dbColumnAttribute_0;

	private Class12 class12_0;

	private Interface1 interface1_0;

	private Interface2 interface2_0;

	public Class34(DbColumnAttribute dbColumnAttribute_1, Class12 class12_1)
	{
		if (dbColumnAttribute_1 == null)
		{
			throw new ArgumentNullException("attr");
		}
		if (class12_1 == null)
		{
			throw new ArgumentNullException("member");
		}
		this.dbColumnAttribute_0 = dbColumnAttribute_1;
		this.class12_0 = class12_1;
	}

	public void method_0()
	{
		PropertyInfo propertyInfo = this.method_2().vmethod_6() as PropertyInfo;
		if (propertyInfo == null)
		{
			return;
		}
		if (this.interface1_0 == null && propertyInfo.CanRead)
		{
			this.interface1_0 = Class16.smethod_2(propertyInfo);
		}
		if (this.interface2_0 == null && propertyInfo.CanWrite)
		{
			this.interface2_0 = Class16.smethod_3(propertyInfo);
		}
	}

	public DbColumnAttribute method_1()
	{
		return this.dbColumnAttribute_0;
	}

	public Class12 method_2()
	{
		return this.class12_0;
	}

	public Type method_3()
	{
		return this.class12_0.vmethod_2();
	}

	public object method_4(object object_0)
	{
		if (this.class6_0 != null)
		{
			Delegate1 @delegate = this.class6_0.method_2();
			if (@delegate != null)
			{
				return @delegate(object_0, this.class12_0.vmethod_3());
			}
		}
		if (this.interface1_0 != null)
		{
			return this.interface1_0.imethod_0(object_0);
		}
		return this.class12_0.vmethod_0(object_0);
	}

	public bool method_5(object object_0, object object_1)
	{
		if (this.class6_0 != null)
		{
			Delegate2 @delegate = this.class6_0.method_4();
			if (@delegate != null)
			{
				@delegate(object_0, this.class12_0.vmethod_3(), object_1);
				return true;
			}
		}
		bool result;
		try
		{
			Type type = this.method_3().smethod_3();
			if (type.IsEnum)
			{
				if (this.interface2_0 != null)
				{
					this.interface2_0.imethod_0(object_0, Convert.ToInt32(object_1));
				}
				else
				{
					this.class12_0.vmethod_1(object_0, Convert.ToInt32(object_1));
				}
			}
			else if (object_1.GetType() == type)
			{
				if (this.interface2_0 != null)
				{
					this.interface2_0.imethod_0(object_0, object_1);
				}
				else
				{
					this.class12_0.vmethod_1(object_0, object_1);
				}
			}
			else if (this.interface2_0 != null)
			{
				this.interface2_0.imethod_0(object_0, Convert.ChangeType(object_1, type));
			}
			else
			{
				this.class12_0.vmethod_1(object_0, Convert.ChangeType(object_1, type));
			}
			result = true;
		}
		catch
		{
			result = false;
		}
		return result;
	}
}
